package com.tian.scroll.view_move;

import android.os.Bundle;

import com.tian.scroll.R;
import com.tian.scroll.databinding.ActivityMoveViewBinding;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;

/**
 * @author tiansongtao, Email:769001510@qq.com, created on 2021/1/19 12:01
 * android 滑动
 */
public class MoveViewActivity extends AppCompatActivity {

    private ActivityMoveViewBinding b;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        b = DataBindingUtil.setContentView(this, R.layout.activity_move_view);
        //BottomNavigationView navView = findViewById(R.id.nav_view);
        // Passing each menu ID as a set of Ids because each
        // menu should be considered as top level destinations.
        AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
                R.id.tab_scroll_view, R.id.tab_translation_view, R.id.tab_layout_params_view)
                .build();
        NavController navController = Navigation.findNavController(this, R.id.move_view_nav_host_fragment);
        NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
        NavigationUI.setupWithNavController(b.navView, navController);
    }

}